home *** CD-ROM | disk | FTP | other *** search
- PXFLOCALTIME(3F) Last changed: 1-22-99
-
-
- NNAAMMEE
- PPXXFFLLOOCCAALLTTIIMMEE - Converts to local time
-
- SSYYNNOOPPSSIISS
- SSUUBBRROOUUTTIINNEE PPXXFFLLOOCCAALLTTIIMMEE ((_i_s_e_c_n_d_s,, _i_a_t_i_m_e,, _i_e_r_r_o_r))
- IINNTTEEGGEERR _i_s_e_c_n_d_s,, _i_a_t_i_m_e,, _i_e_r_r_o_r
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- IEEE standard interface for FORTRAN 77
-
- DDEESSCCRRIIPPTTIIOONN
- On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
- default when compiling programs with the MIPSpro 7 Fortran 90 compiler
- or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
- F77 compiler.
-
- The PPXXFFLLOOCCAALLTTIIMMEE routine uses the llooccaallttiimmee function to convert
- seconds since 00:00:00 CTU (coordinated universal time), January 1,
- 1970 (the _E_p_o_c_h), to broken-down time. Adjustments for time zone and
- daylight savings time are made according to the TTZZ environment
- variable.
-
- When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
- UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
- kind unless documented otherwise. On UNICOS and UNICOS/mk, default
- kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
- IRIX, the default kind is KKIINNDD==44.
-
- The following is a list of valid arguments for this routine:
-
- _i_s_e_c_n_d_s An input integer variable containing the number of seconds
- since 00:00:00 CTU, January 1, 1970.
-
- _i_a_t_i_m_e An output integer array with the elements:
-
- _i_a_t_i_m_e(1) =
- seconds (0-61, for leap seconds)
-
- _i_a_t_i_m_e(2) =
- minutes (0-59)
-
- _i_a_t_i_m_e(3) =
- hours (0-23)
-
- _i_a_t_i_m_e(4) =
- day of the month (1-31)
-
- _i_a_t_i_m_e(5) =
- month of the year (1-12)
-
- _i_a_t_i_m_e(6) =
- Gregorian year (e.g., 1995)
-
- _i_a_t_i_m_e(7) =
- Day of the week (0 = Sunday)
-
- _i_a_t_i_m_e(8) =
- Day of the year (1-366)
-
- _i_a_t_i_m_e(9) =
- Daylight savings flag (0 = standard, nonzero =
- daylight savings)
-
- _i_e_r_r_o_r An output integer variable that contains zero if
- PPXXFFLLOOCCAALLTTIIMMEE was successful or nonzero if PPXXFFLLOOCCAALLTTIIMMEE was
- unsuccessful.
-
- This routine may return the EEIINNVVAALL error value if the current value of
- the TTZZ environment variable is invalid. _i_a_t_i_m_e is left unchanged if
- this error occurs.
-
- EEXXAAMMPPLLEESS
- In this example, the current time, date, and time system are displayed
- if PPXXFFLLOOCCAALLTTIIMMEE and PPXXFFTTIIMMEE are successful.
-
- program pxftest
- integer isecnds, iatime(9), ierror
-
- CALL PXFTIME(isecnds,ierror)
- if (ierror .eq. 0) then
- CALL PXFLOCALTIME(isecnds,iatime,ierror)
- if (ierror .eq. 0) then
- print *,'Time: ',IATIME(3),':',IATIME(2),':',IATIME(1)
- print *,'Date: ',IATIME(4),'.',IATIME(5),'.',IATIME(6)
- if (IATIME(9) .eq. 0) then
- print *,'standard time'
- else
- print *,'daylight savings'
- endif
- else
- print *,'PXFTIME error = ',ierror
- endif
- else
- print *,'PXFTIME error = ',ierror
- endif
- end
-
- This example may display:
-
- Time: 8:37:24
- Date: 11.7.1996
- daylight savings
-
- SSEEEE AALLSSOO
- ccttiimmee(3C)
-
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed
- version of this man page.
-